﻿using System;

namespace WebAPI.Entities;

public class Article
{
    private string id;
    private string user_id;
    private string title;
    private string inner_text;
    private string tag;
    private long star;
    private long watcher;
    private string create_time;
    private string update_time;

    public Article()
    {
    }

    public Article(string id, string userId, string title, string innerText, string tag, long star, long watcher, string createTime, string updateTime)
    {
        this.id = id;
        user_id = userId;
        this.title = title;
        inner_text = innerText;
        this.tag = tag;
        this.star = star;
        this.watcher = watcher;
        create_time = createTime;
        update_time = updateTime;
    }

    public string Id
    {
        get => id;
        set => id = value ?? throw new ArgumentNullException(nameof(value));
    }

    public string UserId
    {
        get => user_id;
        set => user_id = value ?? throw new ArgumentNullException(nameof(value));
    }

    public string Title
    {
        get => title;
        set => title = value ?? throw new ArgumentNullException(nameof(value));
    }

    public string InnerText
    {
        get => inner_text;
        set => inner_text = value ?? throw new ArgumentNullException(nameof(value));
    }

    public string Tag
    {
        get => tag;
        set => tag = value ?? throw new ArgumentNullException(nameof(value));
    }

    public long Star
    {
        get => star;
        set => star = value;
    }

    public long Watcher
    {
        get => watcher;
        set => watcher = value;
    }

    public string CreateTime
    {
        get => create_time;
        set => create_time = value;
    }

    public string UpdateTime
    {
        get => update_time;
        set => update_time = value;
    }
}